var e = require("../../../../../common/vendor.js"), t = {
    name: "TableCheckbox",
    emits: [ "checkboxSelected" ],
    props: {
        indeterminate: {
            type: Boolean,
            default: !1
        },
        checked: {
            type: [ Boolean, String ],
            default: !1
        },
        disabled: {
            type: Boolean,
            default: !1
        },
        index: {
            type: Number,
            default: -1
        },
        cellData: {
            type: Object,
            default: function() {
                return {};
            }
        }
    },
    watch: {
        checked: function(e) {
            "boolean" == typeof this.checked ? this.isChecked = e : this.isChecked = !0;
        },
        indeterminate: function(e) {
            this.isIndeterminate = e;
        }
    },
    data: function() {
        return {
            isChecked: !1,
            isDisabled: !1,
            isIndeterminate: !1
        };
    },
    created: function() {
        "boolean" == typeof this.checked && (this.isChecked = this.checked), this.isDisabled = this.disabled;
    },
    methods: {
        selected: function() {
            this.isDisabled || (this.isIndeterminate = !1, this.isChecked = !this.isChecked, 
            console.log("===", this.indeterminate, this.isChecked), this.$emit("checkboxSelected", {
                checked: this.isChecked,
                data: this.cellData
            }));
        }
    }
}, i = e._export_sfc(t, [ [ "render", function(t, i, s, c, n, d) {
    return e.e({
        a: !s.indeterminate
    }, s.indeterminate ? {} : {
        b: n.isChecked ? 1 : "",
        c: n.isDisabled ? 1 : ""
    }, {
        d: e.o(function() {
            return d.selected && d.selected.apply(d, arguments);
        })
    });
} ] ]);

wx.createComponent(i);